<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('客户编辑')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-customer-edit" th:object="${customer}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户姓名：</label>
                <div class="col-sm-8">
                    <input name="customerName" th:field="*{customerName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系方式：</label>
                <div class="col-sm-8">
                    <input name="customerPhone" th:field="*{customerPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">意向校区：</label>
                <div class="col-sm-8">
                    <select name="school_value" class="form-control m-b" th:with="type=${@dict.getType('schoolType')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{school_value}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">来源渠道：</label>
                <div class="col-sm-8">
                    <select name="source_value" class="form-control m-b" th:with="type=${@dict.getType('sourceType')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{source_value}"></option>
                    </select>
                </div>
            </div>

           <!-- <div class="form-group">
                <label class="col-sm-3 control-label">服务类型：</label>
                <div class="col-sm-8">
                    <select name="serviceType" class="form-control m-b" th:with="type=${@dict.getType('cmi_service_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{serviceType}"></option>
                    </select>
                </div>
            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/customer";
        $("#form-customer-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-customer-edit').serialize());
            }
        }

        $("input[name='actualArrivalTime']").datetimepicker({
            format: "yyyy-mm-dd hh:ii",
            autoclose: true
        });
    </script>
</body>
</html>